package com.isias.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.isias.model.El.ElPaper;
import com.isias.model.El.ElUserPaper;
import com.isias.model.El.ElUserPaperAnswer;
import com.isias.model.dto.ElUserPaperAnswerDto;
import com.isias.model.dto.ElUserPaperDto;
import com.isias.model.dto.WorkDetailDto;
import com.isias.model.vo.ElPaperQueryVo;
import com.isias.model.vo.WorkDetailVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

import java.util.List;


@Mapper
public interface ElUserPaperAnswerMapper extends BaseMapper<ElUserPaperAnswer> {

    Integer CreatPaperToUser(ElUserPaper e);   //插入试卷和用户信息，并回显id（实体类接收）


    Integer batchInsertDatas(@Param("usid") String userpaperId,@Param("list") List<String> list); //批量插入信息

    List<ElUserPaperAnswerDto> InitQu(@Param("id") String elUserPaperId);

    List<ElUserPaperAnswer> GetElUserPaperAnswerByElUserPaperID(@Param("id") String elUserPaperId);

    ElUserPaperAnswerDto GetOneQu(String elUserPaperId,String quId);

    Integer batchUpdateDatas(@Param("list") List<ElUserPaperAnswer> list); //批量更新信息

    IPage<ElUserPaperDto> Mywork(Page<ElUserPaperDto> pageparam,String id, @Param("vo") ElPaperQueryVo elPaperQueryVo);

    Integer updateElUserPaper(Integer point, String id);

    String GetPaperIdByElUserPaperID(@Param("id") String elUserPaperId);

    Integer updateGetPoint(String upid,int point);

    IPage<WorkDetailDto> workDetail(Page<WorkDetailDto> pageparam, String paperId,@Param("vo") WorkDetailVo workDetailVo);

    Integer GetsumPoint(@Param("id") String elUserPaperId);




}
